

import formula.calculator.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class Chemistry extends Activity {

        @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.chemistry_activity);
    }
        
        public void onClick(View v) {
                Intent i = null;
                switch(v.getId()) {
                case R.id.specificHeat:
                        i = new Intent(this, SpecificHeat.class);
                        break;
                }
                if(i != null) {
                        startActivity(i);
                }
        }
        
        /****                   Specific heat capacity                  ****/
        /***            Q = cmt                 ***/
        
        private double specificHeat(double specificHeatCapacity, double mass, double temperature) {
                double result = specificHeatCapacity * mass * temperature;
                return result;
        }
        
        private double specificHeatC(double specificHeat, double mass, double temperature) {
                double result = specificHeat / (mass * temperature);
                return result;
        }
        
        private double specificHeatM(double specificHeat, double specificHeatCapacity, double temperature) {
                double result = specificHeat / (specificHeatCapacity * temperature);
                return result;
        }
        
        private double specificHeatT(double specificHeat, double specificHeatCapacity, double mass) {
                double result = specificHeat / (specificHeatCapacity * mass);
                return result;
        }
        
        private double specificHeatTf(double specificHeat, double specificHeatCapacity, double mass, double initialTemperature) {
                double result = (specificHeat / (specificHeatCapacity * mass)) + initialTemperature;
                return result;
        }
        
        private double specificHeatTi(double specificHeat, double specificHeatCapacity, double mass, double finalTemperature) {
                double result = finalTemperature - (specificHeat / (specificHeatCapacity * mass));
                return result;
        }
}